<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>JSONConvert</title>
<link href="../../../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../";</script><script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script><link href="../../../styles/style.css" rel="Stylesheet"><link href="../../../styles/logo-styles.css" rel="Stylesheet"><link href="../../../styles/jetbrains-mono.css" rel="Stylesheet"><link href="../../../styles/main.css" rel="Stylesheet"><script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script><script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script><script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script><script type="text/javascript" src="../../../scripts/main.js" async="async"></script>  </head>
  <body>
    <div id="container">
      <div id="leftColumn"><a href="../../../index.html">
          <div id="logo"></div>
        </a>
        <div id="paneSearch"></div>
        <div id="sideMenu"></div>
      </div>
      <div id="main">
        <div id="leftToggler"><span class="icon-toggler"></span></div>
<script type="text/javascript" src="../../../scripts/main.js"></script>        <div class="main-content" id="content" pageIds="Net::com.drake.net.convert/JSONConvert///PointingToDeclaration//1281733757">
          <div class="navigation-wrapper" id="navigation-wrapper">
            <div class="breadcrumbs"><a href="../../../index.html">Net</a>/<a href="../index.html">com.drake.net.convert</a>/<a href="index.html">JSONConvert</a></div>
            <div class="pull-right d-flex">
              <div id="searchBar"></div>
            </div>
          </div>
          <div class="cover ">
            <h1 class="cover"><span>J</span><wbr></wbr><span>S</span><wbr></wbr><span>O</span><wbr></wbr><span>N</span><wbr></wbr><span>Convert</span></h1>
            <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">abstract class <a href="index.html">JSONConvert</a>(success: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>, code: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>, message: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>) : <a href="../-net-converter/index.html">NetConverter</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">常见的JSON转换器实现, 如果不满意继承实现自定义的业务逻辑</p></div></div>
          </div>
          <div class="tabbedcontent">
            <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="Constructors">Constructors</button><button class="section-tab" data-togglable="Functions">Functions</button><button class="section-tab" data-togglable="Properties">Properties</button><button class="section-tab" data-togglable="Parameters">Parameters</button></div>
            <div class="tabs-section-body">
              <h2 class="">Parameters</h2>
              <div data-togglable="Parameters">
                <div class="platform-hinted WithExtraAttributes" data-platform-hinted="data-platform-hinted" data-togglable="Parameters"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div data-togglable="Parameters"><div class="table" data-togglable="Parameters"><div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="main-subrow keyValue WithExtraAttributes"><div class=""><span class="inline-flex">success</span></div><div><div class="title"><div data-togglable="Parameters"><p class="paragraph">后端定义为成功状态的错误码值</p></div></div></div></div></div><div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="main-subrow keyValue WithExtraAttributes"><div class=""><span class="inline-flex">code</span></div><div><div class="title"><div data-togglable="Parameters"><p class="paragraph">错误码在JSON中的字段名</p></div></div></div></div></div><div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="main-subrow keyValue WithExtraAttributes"><div class=""><span class="inline-flex">message</span></div><div><div class="title"><div data-togglable="Parameters"><p class="paragraph">错误信息在JSON中的字段名</p></div></div></div></div></div></div></div></div></div>
              </div>
              <h2 class="tabbedcontent">Constructors</h2>
              <div class="table" data-togglable="Constructors"><a data-name="-554002147%2FConstructors%2F1281733757" anchor-label="JSONConvert" id="-554002147%2FConstructors%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue TabbedContent">
                    <div class=""><span class="inline-flex"><a href="-j-s-o-n-convert.html">JSONConvert</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-554002147%2FConstructors%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">fun <a href="-j-s-o-n-convert.html">JSONConvert</a>(success: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a> = &quot;0&quot;, code: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a> = &quot;code&quot;, message: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a> = &quot;msg&quot;)<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief ">后端定义为成功状态的错误码值</div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <h2 class="">Functions</h2>
              <div class="table" data-togglable="Functions"><a data-name="333181174%2FFunctions%2F1281733757" anchor-label="onConvert" id="333181174%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="on-convert.html">onConvert</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="333181174%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">open override fun &lt;<a href="on-convert.html">R</a>&gt; <a href="on-convert.html">onConvert</a>(succeed: <a href="https://developer.android.com/reference/kotlin/java/lang/reflect/Type.html">Type</a>, response: <span data-unresolved-link="okhttp3/Response///PointingToDeclaration/">Response</span>): <a href="on-convert.html">R</a>?<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
</div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="275614772%2FFunctions%2F1281733757" anchor-label="parseBody" id="275614772%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="parse-body.html">parseBody</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="275614772%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">abstract fun &lt;<a href="parse-body.html">R</a>&gt; <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a>.<a href="parse-body.html">parseBody</a>(succeed: <a href="https://developer.android.com/reference/kotlin/java/lang/reflect/Type.html">Type</a>): <a href="parse-body.html">R</a>?<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="275614772%2FFunctions%2F1281733757" anchor-label="parseBody" id="275614772%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="brief "><a data-name="275614772%2FFunctions%2F1281733757" anchor-label="parseBody" id="275614772%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>反序列化JSON</div></div>
</div>
                    </div>
                  </div>
                </div>
              </div>
              <h2 class="">Properties</h2>
              <div class="table" data-togglable="Properties"><a data-name="-270385231%2FProperties%2F1281733757" anchor-label="code" id="-270385231%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="code.html">code</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-270385231%2FProperties%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted" data-togglable="Properties"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><a data-name="-270385231%2FProperties%2F1281733757" anchor-label="code" id="-270385231%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="symbol monospace">val <a href="code.html">code</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><a data-name="-270385231%2FProperties%2F1281733757" anchor-label="code" id="-270385231%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>错误码在JSON中的字段名</div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
<a data-name="-1119313739%2FProperties%2F1281733757" anchor-label="message" id="-1119313739%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="message.html">message</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1119313739%2FProperties%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted" data-togglable="Properties"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><a data-name="-1119313739%2FProperties%2F1281733757" anchor-label="message" id="-1119313739%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="symbol monospace">val <a href="message.html">message</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><a data-name="-1119313739%2FProperties%2F1281733757" anchor-label="message" id="-1119313739%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>错误信息在JSON中的字段名</div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
<a data-name="706810937%2FProperties%2F1281733757" anchor-label="success" id="706810937%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="success.html">success</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="706810937%2FProperties%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted" data-togglable="Properties"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><a data-name="706810937%2FProperties%2F1281733757" anchor-label="success" id="706810937%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="symbol monospace">val <a href="success.html">success</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><a data-name="706810937%2FProperties%2F1281733757" anchor-label="success" id="706810937%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>后端定义为成功状态的错误码值</div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="footer"><span class="go-to-top-icon"><a href="#content"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span></div>
      </div>
    </div>
  </body>
</html>

